RtReleaseInterruptVector

NOTE:  This API call has been superceded by RtReleaseInterrupt in RTSS. When writing RTSS applications, use RtReleaseInterrupt, instead of RtReleaseInterruptVector, which may be deprecated in the future.

RtReleaseInterruptVector releases a previously attached interrupt. This breaks the association between a user's interrupt handling routine and the hardware interrupt.

Syntax

BOOL RtReleaseInterruptVector(
    HANDLE hInterrupt
);

Parameters

hInterrupt

An RTX-specific handle as returned by a preceding call to RtAttachInterruptVector.

Return Values

TRUE if the function succeeds, FALSE if the argument was invalid or the operation on the handle did not succeed

Remarks

Unlike driver unloading, an RTX application can exit and leave a device enabled, with the device attempting to deliver interrupts to the handling thread. Although the RTX library usually cleans up after an application exits, there are times when the exiting application can bypass the library's attempt to detect the exit. To avoid such a condition, use RtReleaseInterruptVector. RtReleaseInterruptVector breaks the association between a device interrupt and the user's handling routine. The user should take care to disable interrupt generation on the hardware device before making a call to this routine. Typically, this is done by writing to the command register of the device.

NOTE:  Just as in an interrupt service routine in a device driver, a real-time application must be able to acknowledge an interrupt and control the device that generated it. For further details on communicating with devices, see Physical Memory Mapping and Port IO.

Requirements

Header Rtapi.h
Library rtapi_w32.lib (Windows), Rtx_Rtss.lib (RTSS)

See Also:

RtAttachInterruptVector

RtAttachInterruptVectorEx

IntervalZero.com | Support | Give Feedback